<template>
	<view class="top">
		<view class="box">
			<view class="name">
				{{name}}
			</view>
			<view class="price">
				￥ {{price.toFixed(2)}} 元
			</view>
			<image :src="img" mode=""></image>
		</view>
	</view>
</template>

<script>
	export default {
		props: ["name", 'price', 'img'],
		name: "brand",
		data() {
			return {

			};
		},
		methods: {
			onclick(id) {
				uni.navigateTo({
					url: `../a/a?id=${id}`
				})
			}
		}
	}
</script>

<style lang="scss">
	.box {
		width: 340rpx;
		height: 150px;
		position: relative;
		float: left;
		margin-left: 25rpx;
		margin-bottom: 5px;

		.name {
			position: absolute;
			top: 10px;
			left: 10px;
			font-size: 12px
		}

		.price {
			position: absolute;
			top: 40px;
			left: 10px;
			color: #8b0000;
		}

		image {
			width: 100%;
			height: 100%;
			z-index: -99;
		}
	}
</style>
